//
//  DeviceParameterViewController.m
//  Fantasia
//
//  Created by kongkong on 16/10/1.
//  Copyright © 2016年 Kongkong. All rights reserved.
//

#import "DeviceParameterViewController.h"
#import "DeviceParamModel.h"

@interface DeviceParameterViewController()
@property (nonatomic,strong) DeviceParamModel* paramModel;
@end

@implementation DeviceParameterViewController

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    
    NSString* title = [[FantasiaStorage instance]memoryValueForKey:@"currentDevice"];
    self.tabBarController.title = [title stringByAppendingString:@" 本机参数"];
}

- (BOOL)autoRefresh{
    return NO;
}

-(DeviceParamModel *)paramModel{
    if (!_paramModel) {
        _paramModel = [DeviceParamModel api:@"device" action:@"FETCHPARAM"];
    }
    return _paramModel;
}

- (DeviceInfoModel *)model{
    return self.paramModel;
}

//- (void)loadData{
//    
//    self.data = @[@"待机温度",@"料槽温度",@"冷冻缸温度",@"当前转速",@"电机状态",@"压缩机状态"];
//    self.detailData = [[[NSUserDefaults standardUserDefaults]valueForKey:[@"detail_data"stringByAppendingString:NSStringFromClass([self class])] ]mutableCopy];
//    if (!self.detailData) {
//        self.detailData = [@[@"12.6℃",@"3.2℃",@"-5.2℃",@"1003",@"on",@"off"]mutableCopy];
//    }
//
//}

@end
